import {baseUrl} from "@/config/env";

export default () => {
    return {
        submitText: '修改',
        size: 'default',
        labelWidth: 120,
        index: true,
        
        menuAlign: 'center',
        menuPosition: "right",
        menuType: 'menu',
        labelPosition: "top",
        searchIndex: 2,
        searchMenuSpan:6,
        searchIcon: true,
        permissionBtn: {
            addBtn: 'tpp:thirdPartyPlatformPlayConfig:add',
            editBtn: 'tpp:thirdPartyPlatformPlayConfig:edit',
            viewBtn: 'tpp:thirdPartyPlatformPlayConfig:info',
            delBtn: 'tpp:thirdPartyPlatformPlayConfig:delete',
            changeEnableBtn: 'tpp:thirdPartyPlatformPlayConfig:changeEnable',
        },
        column: [{
            "addDisplay": false,
            "editDisplay": false,
            "label": "id",
            "prop": "id",
            "hide": true,
            "type": "input"
        },
            {
                "addDisplay": true,
                "editDisplay": true,
                "label": "平台类型",
                "prop": "platformType",
                "showColumn": true,
                type: "tree",
                dicUrl: baseUrl + "/sysDictionaryItem/listByDictionaryCode",
                dicQuery: {
                    dictCode: "third:party:platform:play:configs",
                },
                parent: false,
                props: {
                    label: "dictName",
                    value: "dictVal"
                },
                rules: [
                    {
                        required: true,
                        trigger: "blur"
                    }
                ]
            }, {
                "addDisplay": true,
                "editDisplay": true,
                "label": "名称",
                "prop": "name",
                "showColumn": true,
                "type": "input",
                rules: [
                    {
                        required: true,
                        trigger: "blur"
                    }
                ]
            }, {
                "addDisplay": true,
                "editDisplay": true,
                "label": "appId",
                "prop": "appId",
                "showColumn": true,
                "type": "input",
                rules: [
                    {
                        required: true,
                        trigger: "blur"
                    }
                ]
            },
            {
                "addDisplay": true,
                "editDisplay": true,
                "label": "商户号id",
                "prop": "mchId",
                "showColumn": true,
                "type": "input",
                rules: [
                    {
                        required: true,
                        trigger: "blur"
                    }
                ]
            },
            {
                "addDisplay": true,
                "editDisplay": true,
                "label": "商户密钥",
                "prop": "mchKey",
                "showColumn": true,
                "type": "password",
                rules: [
                    {
                        required: true,
                        trigger: "blur"
                    }
                ]
            },
            {
                "addDisplay": true,
                "editDisplay": true,
                "label": "是否服务商",
                display: false,
                "prop": "isSub",
                "hide": true,
                "type": "select",
                dicData: [
                    {
                        label: "否", value: 0
                    },
                    {
                        label: "是", value: 1
                    }
                ],
                rules: [
                    {
                        required: true,
                        trigger: "blur"
                    }
                ]
            }, {
                "addDisplay": true,
                "editDisplay": true,
                "label": "子商户公众账号ID",
                "prop": "subAppId",
                "hide": true,
                display: false,
                "type": "input"
            }, {
                "addDisplay": true,
                "editDisplay": true,
                "label": "企业支付密钥",
                "prop": "entPayKey",
                "hide": true,
                display: false,
                "type": "input"
            }, {
                "addDisplay": true,
                "editDisplay": true,
                "label": "服务商模式下的子商户号",
                "prop": "subMchId",
                display: false,
                "hide": true,
                "type": "input"
            }, {
                "addDisplay": true,
                "editDisplay": true,
                "label": "消息类型",
                "prop": "msgDataFormat",
                "hide": true,
                "type": "input"
            },
            {
                "addDisplay": true,
                "editDisplay": true,
                "label": "域名访问类型",
                "prop": "serverDomainType",
                "hide": true,
                "type": "radio",
                dicData: [
                    {label: "http", value: "http"},
                    {label: "https", value: "https"}
                ],
                rules: [
                    {
                        required: true,
                        trigger: "blur"
                    }
                ]
            },
            {
                "addDisplay": true,
                "editDisplay": true,
                "label": "域名",
                "prop": "serverDomain",
                "showColumn": true,
                "type": "url",
                overHidden: true,
                alone: true,
                rules: [
                    {
                        required: true,
                        trigger: "blur"
                    }
                ]
            },
            {
                "addDisplay": false,
                "editDetail": true,
                "label": "支付成功回调地址",
                "prop": "notifyUrl",
                "showColumn": true,
                overHidden: true,
                alone: true,
                "type": "url"
            }, {
                "addDisplay": false,
                "editDetail": true,
                "label": "退款回调地址",
                "prop": "notifyRefundUrl",
                "showColumn": true,
                overHidden: true,
                alone: true,
                "type": "url"
            },
            {
                "addDisplay": true,
                "editDisplay": true,
                "label": "证书",
                span: 24,
                "prop": "certificate",
                "showColumn": true,
                "type": "upload",
                action: `${baseUrl}/staticResources/upload?hexName=false`,
                propsHttp: {
                    name: 'ossName',
                    res: 'data',
                    url: 'ossUrl',
                },
            }, {
                "addDisplay": false,
                "editDisplay": false,
                "label": "创建人",
                "prop": "createBy",
                "hide": true,
                "type": "input"
            }, {
                "addDisplay": false,
                "editDisplay": false,
                "label": "创建时间",
                "prop": "createTime",
                "hide": true,
                "type": "datetime"
            }, {
                "addDisplay": false,
                "editDisplay": false,
                "label": "修改人",
                "prop": "updateBy",
                "hide": true,
                "type": "input"
            }, {
                "addDisplay": false,
                "editDisplay": false,
                "label": "修改时间",
                "prop": "updateTime",
                "hide": true,
                "type": "datetime"
            }]

    }
}
